<template>
	<view class="p_bg_all bg">
		<image src="https://dy.sykj365.com/uploads/mini/qingdan@2x.png" mode="widthFix"></image>
		<view class="content p_margin_t_32">
			<view class="p_flex7 p_margin_t_64">
				<input placeholder="请输入分享口令" placeholder-class="p_font_26 p_color_7a" class="p_font_26"
					v-model="code" />
				<view class="p_font_28" @click="getSure">确定</view>
			</view>
			<view class="p_lr_48">
				<view class="p_font_28 p_margin_t_64 p_bold">分享清单是什么？</view>
				<view class="p_font_26 p_color_7a p_margin_t_24">
					创建分享清单后分享给好友，好友点击可查看清单内的文件并一键加入打印列表，实现资料共享，方便一份资料多人多次印刷。</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				code: '',
			}
		},
		methods: {
			getSure() {
				if (!this.code) return getApp().getMsg('请输入分享口令');
				this.getDetail();
			},
			getDetail() {
				let self = this;
				this.$http.post(this.$api.shareDetail, {
					code: this.code
				}).then(res => {
					uni.redirectTo({
						url: '/pages/my/shareDetail?id=' + self.code
					});
				})
			},
		}
	}
</script>

<style lang="less">
	.bg {
		background: linear-gradient(180deg, #05B570 0%, #05B5AA 100%);

		image {
			width: 706rpx;
			margin: 80rpx auto 32rpx;
		}
	}

	.content {
		width: 622rpx;
		height: 600rpx;
		border-radius: 24rpx;
		border: 1px solid #000000;
		background-color: #E3FFF4;
		margin: 0 auto 50rpx;
	}

	.p_flex7 {
		input {
			width: 382rpx;
			height: 88rpx;
			padding: 0 24rpx;
			border-radius: 8rpx;
			box-sizing: border-box;
			border: 1px solid #05B570;
			background-color: #fff;
		}

		view {
			width: 128rpx;
			height: 88rpx;
			color: #fff;
			margin-left: 16rpx;
			border-radius: 8rpx;
			background-color: #05B570;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
</style>